Skip to content

Use authType BASIC for Sabre client in integration tests#27421

Merged
PVince81 merged 1 commit into
masterfrom
inttest-reduce401
Mar 20, 2017
Merged

Use authType BASIC for Sabre client in integration tests#27421
PVince81 merged 1 commit into
masterfrom
inttest-reduce401

Conversation

@PVince81

Copy link
Copy Markdown
Contributor

This helps massively reduce the numerous useless 401 exceptions that
appears in the test log. These appear only because Sabre first connects
without any auth type to receive the challenge and then sends the
authentication data.

With this change it will directly use basic auth.

Thanks to @butonic for hinting at this here https://github.com/owncloud/core/pull/27216/files#diff-5c2150d9ba844c7e57f5de66708c7d78R72

Please review @owncloud/qa @DeepDiver1975

I suggest backporting this, it makes logs from integration tests more readable.

This helps massively reduce the numerous useless 401 exceptions that
appears in the test log. These appear only because Sabre first connects
without any auth type to receive the challenge and then sends the
authentication data.

With this change it will directly use basic auth.
@mention-bot

Copy link
Copy Markdown

@PVince81, thanks for your PR! By analyzing the history of the files in this pull request, we identified @IljaN, @SergioBertolinSG and @davitol to be potential reviewers.

public function downloadPublicFileWithRange($range){
$token = $this->lastShareData->data->token;
$fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav";
$headers['Range'] = $range;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really removing the range?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, unused

public function downloadPublicFileInsideAFolderWithRange($path, $range){
$token = $this->lastShareData->data->token;
$fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav" . "$path";
$headers['Range'] = $range;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, my "IDE" told me it was unused when passing by so I removed it 😉

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$request->addHeader('Range', $range);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@PVince81

Copy link
Copy Markdown
Contributor Author

How can this one be back from the dead ? 😢

"sharing.Merging shares for recipient when shared from outside with group then user and recipient renames in between"

@DeepDiver1975

Copy link
Copy Markdown
Member

I just restarted this one for you

@PVince81

Copy link
Copy Markdown
Contributor Author

I had a quick look at the code with my fix from #26777 but can't understand why it still happens. Since the code doesn't explicitly compares the share ids, it might be that the share provider doesn't actually sort by id. Also the id of IShare->getId() is a string, so in theory it could be an arbitrary non-ordered value...

Maybe there's a way to fix the test to add a delay between share creation.

@SergioBertolinSG SergioBertolinSG self-requested a review March 20, 2017 14:28
@PVince81

Copy link
Copy Markdown
Contributor Author

stable9.1: #27431
stable9: #27432

@lock

lock Bot commented Aug 3, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants